{extend name="public:layout" /}
{block name="title"}会员管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('User/index')}"> 会员管理</a></li>
                <li class="active">修改会员</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">用户名</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入用户名"
                               name="username" value="{$info.username}" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">手机号</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入手机号"
                               name="mobile" value="{$info.mobile}" datatype="m" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">邮箱</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入邮箱"
                               name="email" value="{$info.email}" datatype="e" ignore="ignore" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">用户密码</label>
                    <div class="col-sm-4">
                        <input type="password" class="form-control" placeholder="请输入用户密码"
                               name="password" value="" />
                        <p class="help-block">不修改密码请留空</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">所属角色</label>
                    <div class="col-sm-4">
                        <select name="group_id" class="form-control">
                            <option value="0">请选择</option>
                            {volist name="groupList" id="vo"}
                            <option value="{$vo.group_id}" {eq name="info.group_id" value="$vo['group_id']"}selected{/eq}>{$vo.title}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">姓名</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入姓名"
                               name="name" value="{$info.name}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">会员头像</label>
                    <div class="col-sm-4">
                        <p class="form-control-static">
                            {:widget('common/Form/singleImg',['field'=>'headimgurl','value'=>$info['headimgurl'],$uid])}
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">生日</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control laydate" placeholder="请选择生日"
                               name="birthday" value="{$info.birthday}" readonly />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">昵称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入昵称"
                               name="alias" value="{$info.alias}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">性别</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="sex" value="0" {eq name="info.sex" value="0"}checked{/eq} /> 保密
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="sex" value="1" {eq name="info.sex" value="1"}checked{/eq} /> 男
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="sex" value="2" {eq name="info.sex" value="2"}checked{/eq} /> 女
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="status" value="1" {eq name="info.status" value="1"}checked{/eq}> 正常
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="status" value="0" {eq name="info.status" value="0"}checked{/eq}> 禁用
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">保存内容</button>
                        <a href="{:url('User/index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        formatDate();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}